<template>
	<view class="content">	
	<u-row>
		<u-input type="text"  placeholder="订单Id" v-model="orderId"/>
	</u-row>
	<u-row>
		<u-button type="primary" @click="onWxMiniPay"> 微信小程序支付</u-button>
	</u-row>
	<u-row>
		<u-button type="success" @click="onKxPay">酷享支付</u-button>
	</u-row>
	<u-row>
		
	</u-row>
			
	</view>
</template>

<script>
	import api from '../../api/index.js'
	export default {
		data() {
			return {
				code: '',
				openId:'',
				userId: 1,
				orderId:''
			}
		},
		onLoad() {
			
		},
		methods: {
			onWxMiniPay(){				
				api.pay.wxMiniPay(this.orderId).then(res=>{					
					wx.requestPayment(res.row).then(p=>{
						console.log(p);
					})					
				});
			},
			onKxPay(){
				api.pay.kxPay(this.orderId).then(res=>{
					wx.requestPayment(res.row).then(p=>{
						console.log(p);
					})					
				});
			},
			onTicketOrderPay(){
				console.log(api.lhf)
				api.lhf.payTicketOrder(this.orderId).then(res=>{
					console.log(res);
					wx.requestPayment(res.row).then(p=>{
						console.log(p);
					})					
				});
			},
			onAddArticle(){
				api.circleArticle.add({
					content:'推手圈发文',
					imgUrls: ['http://xxxx','http://xxxx']					
				}).then(res=>{
					console.log(res);
				});
			},
			onDeleteUserAddress(){
				api.userAddress.remove(['062572AD-0A9C-EB11-9B00-00CFE04100DD']).then(res=>{
					console.log(res);
				});
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
